package crm.view.leeds;

import javax.swing.JPanel;
import javax.swing.SpringLayout;
import javax.swing.JLabel;
import javax.swing.JComboBox;
import javax.swing.JTextArea;
import java.awt.Dimension;
import java.awt.Font;
import javax.swing.border.TitledBorder;
import java.awt.Color;
import javax.swing.DefaultComboBoxModel;
import javax.swing.UIManager;

public class OfficeUsePanel extends JPanel 
{
	private JComboBox comboBoxFlatSuggested;
	private JTextArea textAreaComments;
	private JComboBox comboBoxAttendedBy;
	private JComboBox comboBoxStatus;
	private JComboBox comboBoxPriority;
	
	public OfficeUsePanel() 
	{
		setBackground(Color.LIGHT_GRAY);
		setBorder(new TitledBorder(UIManager.getBorder("TitledBorder.border"), "Office Use", TitledBorder.LEFT, TitledBorder.TOP, null, Color.DARK_GRAY));
		setPreferredSize(new Dimension(300, 520));
		SpringLayout springLayout = new SpringLayout();
		setLayout(springLayout);
		
		JLabel lblFlatSuggested = new JLabel("Flat Suggested");
		lblFlatSuggested.setFont(new Font("MS Reference Sans Serif", Font.PLAIN, 13));
		springLayout.putConstraint(SpringLayout.NORTH, lblFlatSuggested, 30, SpringLayout.NORTH, this);
		springLayout.putConstraint(SpringLayout.WEST, lblFlatSuggested, 30, SpringLayout.WEST, this);
		add(lblFlatSuggested);
		
		comboBoxFlatSuggested = new JComboBox();
		comboBoxFlatSuggested.setModel(new DefaultComboBoxModel(new String[] {"1bhk", "2bhk", "3bhk"}));
		comboBoxFlatSuggested.setFont(new Font("MS Reference Sans Serif", Font.PLAIN, 13));
		comboBoxFlatSuggested.setPreferredSize(new Dimension(220, 23));
		springLayout.putConstraint(SpringLayout.NORTH, comboBoxFlatSuggested, 6, SpringLayout.SOUTH, lblFlatSuggested);
		springLayout.putConstraint(SpringLayout.WEST, comboBoxFlatSuggested, 0, SpringLayout.WEST, lblFlatSuggested);
		add(comboBoxFlatSuggested);
		
		JLabel lblStatus = new JLabel("Status");
		lblStatus.setFont(new Font("MS Reference Sans Serif", Font.PLAIN, 13));
		springLayout.putConstraint(SpringLayout.NORTH, lblStatus, 30, SpringLayout.SOUTH, comboBoxFlatSuggested);
		springLayout.putConstraint(SpringLayout.WEST, lblStatus, 0, SpringLayout.WEST, lblFlatSuggested);
		add(lblStatus);
		
		comboBoxStatus = new JComboBox();
		comboBoxStatus.setFont(new Font("MS Reference Sans Serif", Font.PLAIN, 13));
		comboBoxStatus.setPreferredSize(new Dimension(220, 23));
		springLayout.putConstraint(SpringLayout.NORTH, comboBoxStatus, 6, SpringLayout.SOUTH, lblStatus);
		springLayout.putConstraint(SpringLayout.WEST, comboBoxStatus, 0, SpringLayout.WEST, lblFlatSuggested);
		add(comboBoxStatus);
		
		JLabel lblAttendedBy = new JLabel("Attended By");
		lblAttendedBy.setFont(new Font("MS Reference Sans Serif", Font.PLAIN, 13));
		springLayout.putConstraint(SpringLayout.NORTH, lblAttendedBy, 30, SpringLayout.SOUTH, comboBoxStatus);
		springLayout.putConstraint(SpringLayout.WEST, lblAttendedBy, 0, SpringLayout.WEST, lblFlatSuggested);
		add(lblAttendedBy);
		
		comboBoxAttendedBy = new JComboBox();
		comboBoxAttendedBy.setFont(new Font("MS Reference Sans Serif", Font.PLAIN, 13));
		comboBoxAttendedBy.setPreferredSize(new Dimension(220, 23));
		springLayout.putConstraint(SpringLayout.NORTH, comboBoxAttendedBy, 6, SpringLayout.SOUTH, lblAttendedBy);
		springLayout.putConstraint(SpringLayout.WEST, comboBoxAttendedBy, 0, SpringLayout.WEST, lblFlatSuggested);
		add(comboBoxAttendedBy);
		
		JLabel lblPriority = new JLabel("Priority");
		lblPriority.setFont(new Font("MS Reference Sans Serif", Font.PLAIN, 13));
		springLayout.putConstraint(SpringLayout.NORTH, lblPriority, 30, SpringLayout.SOUTH,comboBoxAttendedBy);
		springLayout.putConstraint(SpringLayout.WEST, lblPriority, 0, SpringLayout.WEST, lblFlatSuggested);
		add(lblPriority);
		
		comboBoxPriority = new JComboBox();
		comboBoxPriority.setFont(new Font("MS Reference Sans Serif", Font.PLAIN, 13));
		comboBoxPriority.setPreferredSize(new Dimension(220, 23));
		springLayout.putConstraint(SpringLayout.NORTH, comboBoxPriority, 6, SpringLayout.SOUTH, lblPriority);
		springLayout.putConstraint(SpringLayout.WEST, comboBoxPriority, 0, SpringLayout.WEST, lblFlatSuggested);
		add(comboBoxPriority);
		
		JLabel lblComments = new JLabel("Comments");
		lblComments.setFont(new Font("MS Reference Sans Serif", Font.PLAIN, 13));
		springLayout.putConstraint(SpringLayout.NORTH, lblComments, 30, SpringLayout.SOUTH, comboBoxPriority);
		springLayout.putConstraint(SpringLayout.WEST, lblComments, 0, SpringLayout.WEST, lblFlatSuggested);
		add(lblComments);
		
		textAreaComments = new JTextArea();
		textAreaComments.setFont(new Font("MS Reference Sans Serif", Font.PLAIN, 13));
		textAreaComments.setRows(5);
		textAreaComments.setColumns(20);
		springLayout.putConstraint(SpringLayout.NORTH, textAreaComments, 6, SpringLayout.SOUTH, lblComments);
		springLayout.putConstraint(SpringLayout.WEST, textAreaComments, 0, SpringLayout.WEST, lblFlatSuggested);
		add(textAreaComments);
	}

	public JComboBox getComboBoxFlatSuggested() {
		return comboBoxFlatSuggested;
	}

	public void setComboBoxFlatSuggested(JComboBox comboBoxFlatSuggested) {
		this.comboBoxFlatSuggested = comboBoxFlatSuggested;
	}

	public JTextArea getTextAreaComments() {
		return textAreaComments;
	}

	public void setTextAreaComments(JTextArea textAreaComments) {
		this.textAreaComments = textAreaComments;
	}

	public JComboBox getComboBoxAttendedBy() {
		return comboBoxAttendedBy;
	}

	public void setComboBoxAttendedBy(JComboBox comboBoxAttendedBy) {
		this.comboBoxAttendedBy = comboBoxAttendedBy;
	}

	public JComboBox getComboBoxStatus() {
		return comboBoxStatus;
	}

	public void setComboBoxStatus(JComboBox comboBoxStatus) {
		this.comboBoxStatus = comboBoxStatus;
	}

	public JComboBox getComboBoxPriority() {
		return comboBoxPriority;
	}

	public void setComboBoxPriority(JComboBox comboBoxPriority) {
		this.comboBoxPriority = comboBoxPriority;
	}
}
